<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<!DOCTYPE html>
<html>
		<head>
			<meta charset="utf-8">
			<meta name="keywords" content="" />
			<meta name="description" content="" />
			<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
			<meta name="apple-mobile-web-app-status-bar-style" content="wrw" />
			<meta name="apple-mobile-web-app-capable" content="yes" />
			<meta name="format-detection" content="telephone=no" />
			<title></title>
			<link id="link1" rel="stylesheet" href="${ctxStatic}/member/themes/expand/css/public.css" />
			<link id="link2" rel="stylesheet" href="${ctxStatic}/member/themes/expand/css/style.css?v=232rwerr" />
			<script type="text/javascript" src="${ctxStatic}/member/themes/expand/js/jquery-1.7.2.min.js"></script>
			<script type="text/javascript" src="${ctxStatic}/member/themes/expand/js/jQuery.js"></script>			
		</head>
		<style type="text/css">
		</style>
		<script>
		 
		function jifenuse(){
			$('#get').hide();
			$('#use').css('display','block');
			$('#g').css('border-bottom','0px');
			$('#u').css('border-bottom','3px #13C7AE solid');
			jifen=-1;
			getjifen();
		}
		function jifenget(){
			$('#use').hide();
			$('#get').css('display','block');
			$('#g').css('border-bottom','3px #13C7AE solid');
			$('#u').css('border-bottom','0px');
			jifen=1;
		}
		
		
		 var firstg=0;
		 var firstu=0;
			function getScrollTop() { 
				var scrollTop = 0; 
				if (document.documentElement && document.documentElement.scrollTop) { 
				scrollTop = document.documentElement.scrollTop; 
				} 
				else if (document.body) { 
				scrollTop = document.body.scrollTop; 
				} 
				return scrollTop; 
			} 

				//获取当前可是范围的高度 
			function getClientHeight() { 
				var clientHeight = 0; 
				if (document.body.clientHeight && document.documentElement.clientHeight) { 
				clientHeight = Math.min(document.body.clientHeight, document.documentElement.clientHeight); 
				} 
				else { 
				clientHeight = Math.max(document.body.clientHeight, document.documentElement.clientHeight); 
				} 
				return clientHeight; 
			} 

			//获取文档完整的高度 
			function getScrollHeight() { 
				return Math.max(document.body.scrollHeight, document.documentElement.scrollHeight); 
			} 

			window.onscroll = function () {
				if (getScrollTop() + getClientHeight() == getScrollHeight()) { 
					getjifen();
				}
			}
				
				
			
		var jifen=1;	  
		function getjifen(){  
			
			if(jifen == 1){
				firstg++;
				first=firstg;
			}
			if(jifen == -1){
				firstu++;
				first=firstu;
			}
			

			$.get("${ctxFront}/expand/jifenajax", {first: first,jifen:jifen,uid:'${uid}',memberId:'${memberId}'}, function(data){
				
				first++;
				var list = data.result;
				var innerHTML = "";
				$.each(list, function(i, n){
					innerHTML+= '<li class="menu">'
						+'<p>'+n.remarks+'</p>'
						+'<span>'+n.create_time+'</span>'
						+'<span style="float: right">'+'<i class="redfont">'+n.score+'</i>'+'积分'+'</span>'
					+'</li>';
				});
				 if(jifen == 1){
			  	 	$("#jifeng").append(innerHTML); 
			  	 }
			  	if(jifen == -1){
				  	$("#jifenu").append(innerHTML); 
				}
			});
			
			/* 
			  $.get("${ctxFront}/expand/jifenajax",{first: first,jifen:jifen,uid:'${uid}',memberId:'${memberId}'}, function(data){
				  var list = data.result;
				     var innerHTML='';
		  		 	$.each(list, function(i, n){
					     innerHTML+= '<li class="menu">'
							+'<p>'+n.remarks+'</p>'
							+'<span>'+n.create_time+'</span>'
							+'<span style="float: right">'+'<i class="redfont">'+n.score+'</i>'+'积分'+'</span>'
						+'</li>';
		  			}); 
		  	 	  if(jifen == 1){
		  	 		$("#jifeng").append(innerHTML); 
		  	 	  }
		  	 	 if(jifen == -1){
			  	 		$("#jifenu").append(innerHTML); 
			  	 	  }
		  	    });
			   */
		  }
		  
		 
		$(function(){
			getjifen();
		  });
		</script>

	<body style="background: #F2F2F2;">	
		<div style="padding: 10px; background-color: #13C7AE; color: #FFFFFF;">积分使用和积分获取记录</div>
			<section style="padding-bottom: 50px; font-size: 13px;">
				<div style="background: #FFFFFF;">
					<ul class="jfList">
						<li onclick="jifenget()"  id="g">积分获取</li><li onclick="jifenuse()"  id="u">积分使用</li>
					</ul>
				</div>
				<div id="get">
					<ul id="jifeng">
					</ul>
				</div>
				<div id="use" class="none">
					<ul id="jifenu">
					</ul>
				</div>
			</section>
		<footer class="footer" onclick="location='http://www.hdzhx.com/me/microengine/index.html#page1'">
			<img src="${ctxStatic}/member/themes/expand/img/me.jpg" width="100px">				
		</footer>
	</body>

</html>